package com.gree.scmservice.entity.saas;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 包路径: com.gree.scmservice.entity.saas
 * 项目名: scm-api
 * 创建时间: 2021-07-12 12:30
 * 描述: TODO
 **/
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.PK;
import org.nutz.dao.entity.annotation.Table;
import com.gree.common.entity.BaseEntity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 系统订单信息对象 SAAS_SYS_ORDER
 *
 * @author gscm
 * @date 2021-10-19
 */
@Data
@Table("SAAS_SYS_ORDER")
@ApiModel(description = "系统订单信息")
public class SaasSysOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单号 */
    @Name
    @ApiModelProperty("订单号")
    private String order_no;

    /** 租户ID */
    @Column(hump = true)
    @ApiModelProperty("租户ID")
    private String tenantId;

    /** 支付流水号 */
    @Column(hump = true)
    @ApiModelProperty("支付流水号")
    private String outTradeNo;

    /** 套餐id */
    @Column(hump = true)
    @ApiModelProperty("套餐id")
    private String groupId;

    /** 套餐单位周期数量 */
    @Column(hump = true)
    @ApiModelProperty("套餐单位周期数量")
    private Long groupPeriodNum;

    /** 套餐单位 */
    @Column(hump = true)
    @ApiModelProperty("套餐单位")
    private String groupPeriodUnit;

    /** 是否删除 */
    @Column(hump = true)
    @ApiModelProperty("是否删除(1:否)")
    private Integer isDelete;

    /** 付款凭证 */
    @Column(hump = true)
    @ApiModelProperty("付款凭证")
    private String payCert;

    /** 付款凭证说明 */
    @Column(hump = true)
    @ApiModelProperty("付款凭证说明")
    private String payCertex;

    /** 订单状态(1:默认2:通过3:拒绝4:关闭) */
    @Column(hump = true)
    @ApiModelProperty("订单状态(1:默认2:通过3:拒绝4:关闭)")
    private Integer orderStatus;

    /** 订单类型(1:新购2:续费3:升级4:退款) */
    @Column(hump = true)
    @ApiModelProperty("订单类型(1:新购2:续费3:升级4:退款)")
    private Integer orderType;

    /** 付款时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Column(hump = true)
    @ApiModelProperty("付款时间")
    private LocalDateTime payTime;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Column
    @ApiModelProperty("创建时间")
    private LocalDateTime create_time;

    /** 付款方式 */
    @Column(hump = true)
    @ApiModelProperty("付款方式")
    private Integer payType;

    /** 金额 */
    @Column(hump = true)
    @ApiModelProperty("金额")
    private BigDecimal orderMoney;

    /** 支付状态(1:未支付2:已支付) */
    @Column(hump = true)
    @ApiModelProperty("支付状态(1:未支付2:已支付)")
    private Integer payStatus;

    public void saasSysOrderNoPage()
    {
        super.setBaseEntityNull();
    }
}